<!-- 关联规则实验二数据集的获取 -->
<template>
    <div class="body">
        <el-table :data="jsonData" style="width: 40%">
            <el-table-column prop="id" label="序号" width="180">
            </el-table-column>
            <el-table-column prop="product" label="商品列表" width="180">
            </el-table-column>
        </el-table>
    </div>
</template>

<script>
import JsonViewer from "vue-json-viewer";
export default {
    name: "Exp2DataSet",
    data() {
        return {
            jsonData: [], //数据集
        };
    },
    components: {
        JsonViewer,
    },
    async created() {
        let { data } = await this.$http.get("/one/apriori/dataset");
        data = Object.keys(data).map((item) => {
            return {
                id: item,
                product: data[item].join(","),
            };
        });
        this.jsonData = data;
    },
};
</script>

<style  scoped>

</style>
